package com.coder4j.platform.config;

import com.coder4j.starter.web.util.AuthUtils;
import org.springframework.stereotype.Component;

import javax.servlet.ServletRequestEvent;
import javax.servlet.ServletRequestListener;

@Component
public class ThreadLocalCleaner implements ServletRequestListener {
    @Override
    public void requestDestroyed(ServletRequestEvent sre) {
        AuthUtils.clear();
    }
}

